package cn.ulyer.core.modules.system.rest;


import cn.ulyer.common.jpa.entity.ActionLog;
import cn.ulyer.common.model.PageableVo;
import cn.ulyer.common.utils.PageResult;
import cn.ulyer.common.utils.Result;
import cn.ulyer.core.modules.system.service.TActionLogService;
import cn.ulyer.core.modules.system.vo.ActionLogVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;



/**
 * by generator - rest
 */
@RestController
@RequestMapping("/tActionLogRest")
public class TActionLogRest {

    @Autowired(required = false)
    private TActionLogService tActionLogService;


    /**
     * 分页
     */
    @GetMapping("/page")
    public Result<PageResult<ActionLog>> page(PageableVo pageableVo, ActionLogVo tActionLog){
        PageResult result = tActionLogService.page(pageableVo.render(),tActionLog);
        return Result.ok().data(result);
    }

    @GetMapping("/get")
    public Result<ActionLog> detail(@RequestParam Integer id){
        return Result.ok().data(tActionLogService.getOne(id));
    }



}
